<?php if(!empty($lan_default)&& !empty($lan_to_translate)):?>
 <?php echo form_open('administrator/setting/translate/save') ?>
<table class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th align="center"><?php echo $lan_default->lang_name?></th>
            <th align="center">
                <?php echo $lan_to_translate->lang_name ?>
            </th>
        </tr>
        </thead>
    <tr>
        <td>
            Tittle:
            <?php  $title = $this->_global->_unserialize($product->product_name);
                    echo isset($title[$this->session->userdata('lan')])?$title[$this->session->userdata('lan')]['product_name']:"Không tồn tại tên ngôn ngữ với tiêu đề hiện tại";
             ?>
        </td>
           
            <td align="center">
                <input type="text" name="product_name" id="product_name" value="<?php echo isset($title[$lan_to_translate->lang_code])?$title[$lan_to_translate->lang_code]['product_name']:"";?>" />
            </td> 
    </tr>
    <tr>
        <td>Description:
            <?php  $description = $this->_global->_unserialize($product->product_desc);
                    echo isset($description[$this->session->userdata('lan')])?$description[$this->session->userdata('lan')]['product_desc']:"";
             ?>
        </td>
        <td align="center">
            <textarea class="ckeditor" name="product_desc" id="product_desc" class="large">
                <?php echo isset($description[$lan_to_translate->lang_code])?$description[$lan_to_translate->lang_code]['product_desc']:"";?>
            </textarea>
        </td>
    </tr>
</table>
<a href="<?php echo base_url().'/administrator/setting/translate/product/'?>" class="btn">Cancel</a>
<input type="submit" class="btn btn-prymary" value="Update" />
<input type="hidden" name="action"  value="<?php echo $action ?>" id="action" />
<input type="hidden" name="lang"  value="<?php echo $lang ?>" id="action" />
<input type="hidden" name="product_id"  value="<?php echo $product->product_id?>" id="product_id" />
 </form>
<?php else:?>
<?php redirect('administrator/setting/translate/product/');
    endif;
?>